function more_buttons(buttonlist)
% Thus function adds command buttons to the current buttonlist...
% build just like the main part - concatenates. 
% buttons cannot be removed once installed. Is this a problem?
% 7/5/05 P. Manis
%

global BUTTONS

cmd_vspc = BUTTONS.vspc + 2*BUTTONS.vpad; % extra padding

b_y = BUTTONS.lasty;
for i=BUTTONS.last:length(buttonlist)
   if(strcmp(buttonlist(i).title, 'hrule'))
      b_y = b_y - cmd_vspc*0.75;      
      h1 = uicontrol('Parent', h0, ...
         'Units', 'characters', ...
         'BackgroundColor', [0 0 1], ...
         'Enable', 'off', ...
         'Position', [BUTTONS.x b_y BUTTONS.width+0.5 BUTTONS.ht*0.25]);
      b_y = b_y - cmd_vspc*.25;
   else
      
      b_y = b_y - cmd_vspc;
      
      h1=uicontrol('Parent', h0, ...
         'Units', 'characters', ...
         'FontUnits', 'points', ...
         'FontName', 'Arial', ...
         'FontSize', BUTTONS.fontsize+3, ...
         'ForegroundColor', BUTTONS.buttonlist(i).color, ...
         'Position', [BUTTONS.x b_y BUTTONS.width+0.5 BUTTONS.ht], ...
         'String', BUTTONS.buttonlist(i).title, ...
         'ToolTipString', BUTTONS.buttonlist(i).tooltip, ...
         'Callback', BUTTONS.buttonlist(i).callback, ...
         'Enable', BUTTONS.buttonlist(i).enable, ...
         'Tag', BUTTONS.buttonlist(i).tag);
   end
end
BUTTONS.last = length(BUTTONS.buttonlist);
